/*
 * SafeNativeMethods.cs
 *
 * Contains Safe P/Invoke Methods.
 *
 * Copyright (c) 2005, dnAnalytics. All rights reserved.
 */
using System.Runtime.InteropServices;
using System.Security;

namespace dnAnalytics.Nli.Acml {
	[SuppressUnmanagedCodeSecurity]
	internal sealed class SafeNativeMethods {
		
		private const string dllName = "libacml_dll.dll" ;
		
		private SafeNativeMethods() {}

		#region PInvoke calls

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float sdot(int n, [In] float[] x, int incX, [In] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double ddot(int n, [In] double[] x, int incX, [In] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double dsdot(int n, [In] float[] x, int incX, [In] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float sdsdot(int n, float sb, [In] float[] x, int incX, [In] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern ComplexFloat cdotu(int n, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern ComplexFloat cdotc(int n, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern ComplexDouble zdotu(int n, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern ComplexDouble zdotc(int n, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float snrm2(int n, [In] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float sasum(int n, [In] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double dnrm2(int n, [In] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double dasum(int n, [In] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float scnrm2(int n, [In] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float scasum(int n, [In] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double dznrm2(int n, [In] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double dzasum(int n, [In] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int isamax(int n, [In] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int idamax(int n, [In] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int icamax(int n, [In] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int izamax(int n, [In] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sswap(int n, [In, Out] float[] x, int incX, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void scopy(int n, [In] float[] x, int incX, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void saxpy(int n, float alpha, [In] float[] x, int incX, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void srotg(ref float a, ref float b, out float c, out float s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dswap(int n, [In, Out] double[] x, int incX, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dcopy(int n, [In] double[] x, int incX, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void daxpy(int n, double alpha, [In] double[] x, int incX, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void drotg(ref double a, ref double b, out double c, out double s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cswap(int n, [In, Out] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ccopy(int n, [In] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void caxpy(int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void crotg(ref ComplexFloat a, ref ComplexFloat b, out ComplexFloat c, out ComplexFloat s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zswap(int n, [In, Out] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zcopy(int n, [In] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zaxpy(int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zrotg(ref ComplexDouble a, ref ComplexDouble b, out ComplexDouble c, out ComplexDouble s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void srotmg(float d1, float d2, float x1, float y1, [In, Out] float[] p);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void srot(int n, float[] x, int incX, float[] y, int incY, float c, float s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void srotm(int n, [In, Out] float[] x, int incX, [In, Out] float[] y, int incY, [In, Out] float[] p);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void drotmg(double d1, double d2, double x1, double y1, [In, Out] double[] p);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void drot(int n, [In, Out] double[] x, int incX, [In, Out] double[] y, int incY, double c, double s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void drotm(int n, [In, Out] double[] x, int incX, [In, Out] double[] y, int incY, [In, Out] double[] p);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void csrot(int n, [In, Out] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] y, int incY, float c, float s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zdrot(int n, [In, Out] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] y, int incY, double c, double s);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sscal(int n, float alpha, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dscal(int n, double alpha, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cscal(int n, ref ComplexFloat alpha, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zscal(int n, ref ComplexDouble alpha, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void csscal(int n, float alpha, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zdscal(int n, double alpha, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgemv(char transA, int m, int n, float alpha, [In] float[] a, int lda, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgbmv(char transA, int m, int n, int kl, int ku, float alpha, [In] float[] a, int lda, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void strmv(char uplo, char transA, char diag, int n, [In] float[] a, int lda, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void stbmv(char uplo, char transA, char diag, int n, int k, [In] float[] a, int lda, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void stpmv(char uplo, char transA, char diag, int n, [In] float[] ap, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void strsv(char uplo, char transA, char diag, int n, [In] float[] a, int lda, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void stbsv(char uplo, char transA, char diag, int n, int k, [In] float[] a, int lda, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void stpsv(char uplo, char transA, char diag, int n, [In] float[] ap, [In, Out] float[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgemv(char transA, int m, int n, double alpha, [In] double[] a, int lda, [In] double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgbmv(char transA, int m, int n, int kl, int ku, double alpha, [In] double[] a, int lda, [In] double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dtrmv(char uplo, char transA, char diag, int n, [In] double[] a, int lda, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dtbmv(char uplo, char transA, char diag, int n, int k, [In] double[] a, int lda, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dtpmv(char uplo, char transA, char diag, int n, [In] double[] ap, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dtrsv(char uplo, char transA, char diag, int n, [In] double[] a, int lda, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dtbsv(char uplo, char transA, char diag, int n, int k, [In] double[] a, int lda, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dtpsv(char uplo, char transA, char diag, int n, [In] double[] ap, [In, Out] double[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgemv(char transA, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgbmv(char transA, int m, int n, int kl, int ku, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ctrmv(char uplo, char transA, char diag, int n, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ctbmv(char uplo, char transA, char diag, int n, int k, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ctpmv(char uplo, char transA, char diag, int n, [In] ComplexFloat[] ap, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ctrsv(char uplo, char transA, char diag, int n, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ctbsv(char uplo, char transA, char diag, int n, int k, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ctpsv(char uplo, char transA, char diag, int n, [In] ComplexFloat[] ap, [In, Out] ComplexFloat[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgemv(char transA, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgbmv(char transA, int m, int n, int kl, int ku, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ztrmv(char uplo, char transA, char diag, int n, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ztbmv(char uplo, char transA, char diag, int n, int k, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ztpmv(char uplo, char transA, char diag, int n, [In] ComplexDouble[] ap, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ztrsv(char uplo, char transA, char diag, int n, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ztbsv(char uplo, char transA, char diag, int n, int k, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] x, int incX);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ztpsv(char uplo, char transA, char diag, int n, [In] ComplexDouble[] ap, [In, Out] ComplexDouble[] x, int incX);


		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ssymv(char uplo, int n, float alpha, [In] float[] a, int lda, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ssbmv(char uplo, int n, int k, float alpha, [In] float[] a, int lda, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sspmv(char uplo, int n, float alpha, [In] float[] ap, [In] float[] x, int incX, float beta, [In, Out] float[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sger(int m, int n, float alpha, [In] float[] x, int incX, [In] float[] y, int incY, [In, Out] float[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ssyr(char uplo, int n, float alpha, [In] float[] x, int incX, [In, Out] float[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sspr(char uplo, int n, float alpha, [In] float[] x, int incX, [In, Out] float[] ap);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ssyr2(char uplo, int n, float alpha, [In] float[] x, int incX, [In] float[] y, int incY, [In, Out] float[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sspr2(char uplo, int n, float alpha, [In] float[] x, int incX, [In] float[] y, int incY, [In, Out] float[] a);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dsymv(char uplo, int n, double alpha, [In] double[] a, int lda, double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dsbmv(char uplo, int n, int k, double alpha, [In] double[] a, int lda, [In] double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dspmv(char uplo, int n, double alpha, [In] double[] ap, [In] double[] x, int incX, double beta, [In, Out] double[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dger(int m, int n, double alpha, [In] double[] x, int incX, [In] double[] y, int incY, [In, Out] double[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dsyr(char uplo, int n, double alpha, [In] double[] x, int incX, [In, Out] double[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dspr(char uplo, int n, double alpha, [In] double[] x, int incX, [In, Out] double[] ap);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dsyr2(char uplo, int n, double alpha, [In] double[] x, int incX, [In] double[] y, int incY, [In, Out] double[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dspr2(char uplo, int n, double alpha, [In] double[] x, int incX, [In] double[] y, int incY, [In, Out] double[] a);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void chemv(char uplo, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);
  
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void chbmv(char uplo, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void chpmv(char uplo, int n, ref ComplexFloat alpha, [In] ComplexFloat[] ap, [In] ComplexFloat[] x, int incX, ref ComplexFloat beta, [In, Out] ComplexFloat[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgeru(int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgerc(int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cher(char uplo, int n, float alpha, [In] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void chpr(char uplo, int n, float alpha, [In, Out] ComplexFloat[] x, int incX, [In, Out] ComplexFloat[] a);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cher2(char uplo, int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, [In, Out] ComplexFloat[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void chpr2(char uplo, int n, ref ComplexFloat alpha, [In] ComplexFloat[] x, int incX, [In] ComplexFloat[] y, int incY, [In, Out] ComplexFloat[] ap);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zhemv(char uplo, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zhbmv(char uplo, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zhpmv(char uplo, int n, ref ComplexDouble alpha, [In] ComplexDouble[] ap, [In] ComplexDouble[] x, int incX, ref ComplexDouble beta, [In, Out] ComplexDouble[] y, int incY);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgeru(int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgerc(int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zher(char uplo, int n, double alpha, [In] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zhpr(char uplo, int n, double alpha, [In] ComplexDouble[] x, int incX, [In, Out] ComplexDouble[] a);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zher2(char uplo, int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, [In, Out] ComplexDouble[] a, int lda);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zhpr2(char uplo, int n, ref ComplexDouble alpha, [In] ComplexDouble[] x, int incX, [In] ComplexDouble[] y, int incY, [In, Out] ComplexDouble[] ap);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgemm(char transA, char transB, int m, int n, int k, float alpha, [In] float[] a, int lda, [In] float[] b, int ldb, float beta, [In, Out] float[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ssymm(char side, char uplo, int m, int n, float alpha, [In] float[] a, int lda, [In] float[] b, int ldb, float beta, [In, Out] float[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ssyrk(char uplo, char trans, int n, int k, float alpha, [In] float[] a, int lda, float beta, [In, Out] float[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ssyr2k(char uplo, char trans, int n, int k, float alpha, [In] float[] a, int lda, [In] float[] b, int ldb, float beta, [In, Out] float[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void strmm(char side, char uplo, char transA, char diag, int m, int n, float alpha, [In] float[] a, int lda, [In, Out] float[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void strsm(char side, char uplo, char transA, char diag, int m, int n, float alpha, [In] float[] a, int lda, [In, Out] float[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgemm(char transA, char transB, int m, int n, int k, double alpha, [In] double[] a, int lda, [In] double[] b, int ldb, double beta, [In, Out] double[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dsymm(char side, char uplo, int m, int n, double alpha, [In] double[] a, int lda, [In] double[] b, int ldb, double beta, [In, Out] double[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dsyrk(char uplo, char trans, int n, int k, double alpha, [In] double[] a, int lda, double beta, [In, Out] double[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dsyr2k(char uplo, char trans, int n, int k, double alpha, [In] double[] a, int lda, [In] double[] b, int ldb, double beta, [In, Out] double[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dtrmm(char side, char uplo, char transA, char diag, int m, int n, double alpha, [In] double[] a, int lda, [In, Out] double[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dtrsm(char side, char uplo, char transA, char diag, int m, int n, double alpha, [In] double[] a, int lda, [In, Out] double[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgemm(char transA, char transB, int m, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void csymm(char side, char uplo, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void csyrk(char uplo, char trans, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void csyr2k(char uplo, char trans, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ctrmm(char side, char uplo, char transA, char diag, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ctrsm(char side, char uplo, char transA, char diag, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In, Out] ComplexFloat[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgemm(char transA, char transB, int m, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, ComplexDouble[] b, int ldb, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zsymm(char side, char uplo, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] b, int ldb, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zsyrk(char uplo, char trans, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zsyr2k(char uplo, char trans, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] b, int ldb, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ztrmm(char side, char uplo, char transA, char diag, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ztrsm(char side, char uplo, char transA, char diag, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In, Out] ComplexDouble[] b, int ldb);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void chemm(char side, char uplo, int m, int n, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, ref ComplexFloat beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cherk(char uplo, char trans, int n, int k, float alpha, [In] ComplexFloat[] a, int lda, float beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cher2k(char uplo, char trans, int n, int k, ref ComplexFloat alpha, [In] ComplexFloat[] a, int lda, [In] ComplexFloat[] b, int ldb, float beta, [In, Out] ComplexFloat[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zhemm(char side, char uplo, int m, int n, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] b, int ldb, ref ComplexDouble beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zherk(char uplo, char trans, int n, int k, double alpha, [In] ComplexDouble[] a, int lda, double beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zher2k(char uplo, char trans, int n, int k, ref ComplexDouble alpha, [In] ComplexDouble[] a, int lda, [In] ComplexDouble[] b, int ldb, double beta, [In, Out] ComplexDouble[] c, int ldc);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGEQP3(ref int m, ref int n, [In, Out] float[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] float[] tau, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGESVD(ref char jobu, int ulen, ref char jobvt, int tlen, ref int m, ref int n, [In, Out] float[] a, ref int lda, [In, Out] float[] s, [In, Out] float[] u, ref int ldu, [In, Out] float[] vt, ref int ldvt, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGETRF(ref int m, ref int n, [In, Out] float[] a, ref int lda, [In, Out] int[] ipiv, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGETRI(ref int n, [In, Out] float[] a, ref int lda, [In] int[] ipiv, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGETRS(ref char trans, int len, ref int n, ref int nrhs, [In] float[] a, ref int lda, [In] int[] ipiv, [In, Out] float[] b, ref int ldb, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SORGQR(ref int m, ref int n, ref int k, [In, Out] float[] a, ref int lda, [In] float[] tau, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SORMQR(ref char side, int slen, ref char trans, int tlen, ref int m, ref int n, ref int k, [In] float[] a, ref int lda, [In] float[] tau, [In, Out] float[] c, ref int ldc, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SPOTRF(ref char uplo, int len, ref int n, [In, Out] float[] a, ref int lda, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SPOTRI(ref char uplo, int len, ref int n, [In, Out] float[] a, ref int lda, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SPOTRS(ref char uplo, int len, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, [In, Out] float[] b, ref int ldb, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGEQP3(ref int m, ref int n, [In, Out] double[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] double[] tau, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGESVD(ref char jobu, int ulen, ref char jobvt, int vlen, ref int m, ref int n, [In, Out] double[] a, ref int lda, [In, Out] double[] s, [In, Out] double[] u, ref int ldu, [In, Out] double[] vt, ref int ldvt, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGETRF(ref int m, ref int n, [In, Out] double[] a, ref int lda, [In, Out] int[] ipiv, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGETRI(ref int n, [In, Out] double[] a, ref int lda, [In] int[] ipiv, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGETRS(ref char trans, int len, ref int n, ref int nrhs, [In] double[] a, ref int lda, [In] int[] ipiv, [In, Out] double[] b, ref int ldb, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DORGQR(ref int m, ref int n, ref int k, [In, Out] double[] a, ref int lda, [In] double[] tau, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DORMQR(ref char side, int slen, ref char trans, int tlen, ref int m, ref int n, ref int k, [In] double[] a, ref int lda, [In] double[] tau, [In, Out] double[] c, ref int ldc, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DPOTRF(ref char uplo, int len, ref int n, [In, Out] double[] a, ref int lda, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DPOTRI(ref char uplo, int len, ref int n, [In, Out] double[] a, ref int lda, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DPOTRS(ref char uplo, int len, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGEQP3(ref int m, ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] ComplexFloat[] tau, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGETRF(ref int m, ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] int[] ipiv, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGETRI(ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In] int[] ipiv, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGETRS(ref char trans, int len, ref int n, ref int nrhs, [In] ComplexFloat[] a, ref int lda, [In] int[] ipiv, [In, Out] ComplexFloat[] b, ref int ldb, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CPOTRF(ref char uplo, int len, ref int n, [In, Out] ComplexFloat[] a, ref int lda, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CPOTRI(ref char uplo, int len, ref int n, [In, Out] ComplexFloat[] a, ref int lda, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CPOTRS(ref char uplo, int len, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CUNGQR(ref int m, ref int n, ref int k, [In, Out] ComplexFloat[] a, ref int lda, [In] ComplexFloat[] tau, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CUNMQR(ref char side, int slen, ref char trans, int tlen, ref int m, ref int n, ref int k, [In] ComplexFloat[] a, ref int lda, [In] ComplexFloat[] tau, [In, Out] ComplexFloat[] c, ref int ldc, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGEQP3(ref int m, ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] ComplexDouble[] tau, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGETRF(ref int m, ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] int[] ipiv, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGETRI(ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In] int[] ipiv, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGETRS(ref char trans, int len, ref int n, ref int nrhs, [In] ComplexDouble[] a, ref int lda, [In] int[] ipiv, [In, Out] ComplexDouble[] b, ref int ldb, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZPOTRF(ref char uplo, int len, ref int n, [In, Out] ComplexDouble[] a, ref int lda, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZPOTRI(ref char uplo, int len, ref int n, [In, Out] ComplexDouble[] a, ref int lda, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZPOTRS(ref char uplo, int len, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZUNGQR(ref int m, ref int n, ref int k, [In, Out] ComplexDouble[] a, ref int lda, [In] ComplexDouble[] tau, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZUNMQR(ref char side, int slen, ref char trans, int tlen, ref int m, ref int n, ref int k, [In] ComplexDouble[] a, ref int lda, [In] ComplexDouble[] tau, [In, Out] ComplexDouble[] c, ref int ldc, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGESVD(ref char jobu, int ulen, ref char jobvt, int vlen, ref int m, ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] float[] s, [In, Out] ComplexFloat[] u, ref int ldu, [In, Out] ComplexFloat[] v, ref int ldvt, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGESVD(ref char jobu, int ulen, ref char jobvt, int vlen, ref int m, ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] double[] s, [In, Out] ComplexDouble[] u, ref int ldu, [In, Out] ComplexDouble[] v, ref int ldvt, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGELS(ref char trans, int len, ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, float[] b, ref int ldb, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGELS(ref char trans, int len, ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGELS(ref char trans, int len, ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGELS(ref char trans, int len, ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGELSS(ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, [In, Out] float[] b, ref int ldb, [In, Out] float[] s, ref float rcond, ref int rank, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGELSS(ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, [In, Out] double[] s, ref double rcond, ref int rank, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGELSS(ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] float[] s, ref float rcond, ref int rank, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGELSS(ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] double[] s, ref double rcond, ref int rank, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGELSY(ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, [In, Out] float[] b, ref int ldb, [In, Out] int[] jpvt, ref float rcond, ref int rank, [In, Out] float[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGELSY(ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, [In, Out] int[] jpvt, ref double rcond, ref int rank, [In, Out] double[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGELSY(ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] int[] jpvt, ref float rcond, ref int rank, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGELSY(ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] int[] jpvt, ref double rcond, ref int rank, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float SLANGE(ref char norm, int len, ref int m, ref int n, [In] float[] a, ref int lda, float[] work);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double DLANGE(ref char norm, int len, ref int m, ref int n, [In] double[] a, ref int lda, [In] double[] work);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float CLANGE(ref char norm, int len, ref int m, ref int n, [In] ComplexFloat[] a, ref int lda, float[] work);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double ZLANGE(ref char norm, int len, ref int m, ref int n, [In] ComplexDouble[] a, ref int lda, [In] double[] work);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void SGECON(ref char norm, int len, ref int n, [In] float[] a, ref int lda, ref float anorm, ref float rcond, [In] float[] work, [In] int[] iwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void DGECON(ref char norm, int len, ref int n, [In] double[] a, ref int lda, ref double anorm, ref double rcond, [In] double[] work, [In] int[] iwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void CGECON(ref char norm, int len, ref int n, [In] ComplexFloat[] a, ref int lda, ref float anorm, ref float rcond, [In] ComplexFloat[] work, [In] float[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void ZGECON(ref char norm, int len, ref int n, [In] ComplexDouble[] a, ref int lda, ref double anorm, ref double rcond, [In] ComplexDouble[] work, [In] double[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int SGGEV(ref char jobvl, int llen, ref char jobvr, int rlen, ref int n, float[] a, ref int lda, float[] b, ref int ldb, float[] alphar, float[] alphai, float[] beta, float[] vl, ref int ldvl, float[] vr, ref int ldvr, float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int ILAENV(ref int ispec, string name, int nlen, string opts, int olen, ref int n1, ref int n2, ref int n3, ref int n4);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgeqp3_(ref int m, ref int n, [In, Out] float[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] float[] tau, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgesvd_(ref char jobu, ref char jobvt, ref int m, ref int n, [In, Out] float[] a, ref int lda, [In, Out] float[] s, [In, Out] float[] u, ref int ldu, [In, Out] float[] vt, ref int ldvt, [In, Out] float[] work, ref int lwork, ref int info, int ulen, int tlen);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgetrf_(ref int m, ref int n, [In, Out] float[] a, ref int lda, [In, Out] int[] ipiv, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgetri_(ref int n, [In, Out] float[] a, ref int lda, [In] int[] ipiv, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgetrs_(ref char trans, ref int n, ref int nrhs, [In] float[] a, ref int lda, [In] int[] ipiv, [In, Out] float[] b, ref int ldb, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sorgqr_(ref int m, ref int n, ref int k, [In, Out] float[] a, ref int lda, [In] float[] tau, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sormqr_(ref char side, ref char trans, ref int m, ref int n, ref int k, [In] float[] a, ref int lda, [In] float[] tau, [In, Out] float[] c, ref int ldc, [In, Out] float[] work, ref int lwork, ref int info, int slen, int tlen);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void spotrf_(ref char uplo, ref int n, [In, Out] float[] a, ref int lda, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void spotri_(ref char uplo, ref int n, [In, Out] float[] a, ref int lda, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void spotrs_(ref char uplo, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, [In, Out] float[] b, ref int ldb, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgeqp3_(ref int m, ref int n, [In, Out] double[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] double[] tau, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgesvd_(ref char jobu, ref char jobvt, ref int m, ref int n, [In, Out] double[] a, ref int lda, [In, Out] double[] s, [In, Out] double[] u, ref int ldu, [In, Out] double[] vt, ref int ldvt, [In, Out] double[] work, ref int lwork, ref int info, int ulen, int tlen);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgetrf_(ref int m, ref int n, [In, Out] double[] a, ref int lda, [In, Out] int[] ipiv, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgetri_(ref int n, [In, Out] double[] a, ref int lda, [In] int[] ipiv, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgetrs_(ref char trans, ref int n, ref int nrhs, [In] double[] a, ref int lda, [In] int[] ipiv, [In, Out] double[] b, ref int ldb, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dorgqr_(ref int m, ref int n, ref int k, [In, Out] double[] a, ref int lda, [In] double[] tau, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dormqr_(ref char side, ref char trans, ref int m, ref int n, ref int k, [In] double[] a, ref int lda, [In] double[] tau, [In, Out] double[] c, ref int ldc, [In, Out] double[] work, ref int lwork, ref int info, int slen, int tlen);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dpotrf_(ref char uplo, ref int n, [In, Out] double[] a, ref int lda, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dpotri_(ref char uplo, ref int n, [In, Out] double[] a, ref int lda, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dpotrs_(ref char uplo, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgeqp3_(ref int m, ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] ComplexFloat[] tau, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgetrf_(ref int m, ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] int[] ipiv, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgetri_(ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In] int[] ipiv, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgetrs_(ref char trans, ref int n, ref int nrhs, [In] ComplexFloat[] a, ref int lda, [In] int[] ipiv, [In, Out] ComplexFloat[] b, ref int ldb, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cpotrf_(ref char uplo, ref int n, [In, Out] ComplexFloat[] a, ref int lda, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cpotri_(ref char uplo, ref int n, [In, Out] ComplexFloat[] a, ref int lda, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cpotrs_(ref char uplo, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cungqr_(ref int m, ref int n, ref int k, [In, Out] ComplexFloat[] a, ref int lda, [In] ComplexFloat[] tau, [In, Out] ComplexFloat[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cunmqr_(ref char side, ref char trans, ref int m, ref int n, ref int k, [In] ComplexFloat[] a, ref int lda, [In] ComplexFloat[] tau, [In, Out] ComplexFloat[] c, ref int ldc, [In, Out] ComplexFloat[] work, ref int lwork, ref int info, int slen, int tlen);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgeqp3_(ref int m, ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] int[] jpvt, [In, Out] ComplexDouble[] tau, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgetrf_(ref int m, ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] int[] ipiv, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgetri_(ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In] int[] ipiv, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgetrs_(ref char trans, ref int n, ref int nrhs, [In] ComplexDouble[] a, ref int lda, [In] int[] ipiv, [In, Out] ComplexDouble[] b, ref int ldb, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zpotrf_(ref char uplo, ref int n, [In, Out] ComplexDouble[] a, ref int lda, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zpotri_(ref char uplo, ref int n, [In, Out] ComplexDouble[] a, ref int lda, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zpotrs_(ref char uplo, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zungqr_(ref int m, ref int n, ref int k, [In, Out] ComplexDouble[] a, ref int lda, [In] ComplexDouble[] tau, [In, Out] ComplexDouble[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zunmqr_(ref char side, ref char trans, ref int m, ref int n, ref int k, [In] ComplexDouble[] a, ref int lda, [In] ComplexDouble[] tau, [In, Out] ComplexDouble[] c, ref int ldc, [In, Out] ComplexDouble[] work, ref int lwork, ref int info, int slen, int tlen);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgesvd_(ref char jobu, ref char jobvt, ref int m, ref int n, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] float[] s, [In, Out] ComplexFloat[] u, ref int ldu, [In, Out] ComplexFloat[] v, ref int ldvt, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info, int ulen, int tlen);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgesvd_(ref char jobu, ref char jobvt, ref int m, ref int n, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] double[] s, [In, Out] ComplexDouble[] u, ref int ldu, [In, Out] ComplexDouble[] v, ref int ldvt, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info, int ulen, int tlen);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgels_(ref char trans, ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, float[] b, ref int ldb, [In, Out] float[] work, ref int lwork, ref int info, int len);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgels_(ref char trans, ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] ComplexFloat[] work, ref int lwork, ref int info, int len);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgels_(ref char trans, ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] ComplexDouble[] work, ref int lwork, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgels_(ref char trans, ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, [In, Out] double[] work, ref int lwork, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgelss_(ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, [In, Out] float[] b, ref int ldb, [In, Out] float[] s, ref float rcond, ref int rank, [In, Out] float[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgelss_(ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, [In, Out] double[] s, ref double rcond, ref int rank, [In, Out] double[] work, ref int lwork, ref int info);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgelss_(ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] float[] s, ref float rcond, ref int rank, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgelss_(ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] double[] s, ref double rcond, ref int rank, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgelsy_(ref int m, ref int n, ref int nrhs, [In, Out] float[] a, ref int lda, [In, Out] float[] b, ref int ldb, [In, Out] int[] jpvt, ref float rcond, ref int rank, [In, Out] float[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgelsy_(ref int m, ref int n, ref int nrhs, [In, Out] double[] a, ref int lda, [In, Out] double[] b, ref int ldb, [In, Out] int[] jpvt, ref double rcond, ref int rank, [In, Out] double[] work, ref int lwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgelsy_(ref int m, ref int n, ref int nrhs, [In, Out] ComplexFloat[] a, ref int lda, [In, Out] ComplexFloat[] b, ref int ldb, [In, Out] int[] jpvt, ref float rcond, ref int rank, [In, Out] ComplexFloat[] work, ref int lwork, [In, Out] float[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgelsy_(ref int m, ref int n, ref int nrhs, [In, Out] ComplexDouble[] a, ref int lda, [In, Out] ComplexDouble[] b, ref int ldb, [In, Out] int[] jpvt, ref double rcond, ref int rank, [In, Out] ComplexDouble[] work, ref int lwork, [In, Out] double[] rwork, ref int info);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float slange_(ref char norm, ref int m, ref int n, [In] float[] a, ref int lda, float[] work, int len);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double dlange_(ref char norm, ref int m, ref int n, [In] double[] a, ref int lda, [In] double[] work, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern float clange_(ref char norm, ref int m, ref int n, [In] ComplexFloat[] a, ref int lda, float[] work, int len);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern double zlange_(ref char norm, ref int m, ref int n, [In] ComplexDouble[] a, ref int lda, [In] double[] work, int len);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void sgecon_(ref char norm, ref int n, [In] float[] a, ref int lda, ref float anorm, ref float rcond, [In] float[] work, [In] int[] iwork, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void dgecon_(ref char norm, ref int n, [In] double[] a, ref int lda, ref double anorm, ref double rcond, [In] double[] work, [In] int[] iwork, ref int info, int len);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void cgecon_(ref char norm, ref int n, [In] ComplexFloat[] a, ref int lda, ref float anorm, ref float rcond, [In] ComplexFloat[] work, [In] float[] rwork, ref int info, int len);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern void zgecon_(ref char norm, ref int n, [In] ComplexDouble[] a, ref int lda, ref double anorm, ref double rcond, [In] ComplexDouble[] work, [In] double[] rwork, ref int info, int len);
		
		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int sggev_(ref char jobvl, ref char jobvr, ref int n, float[] a, ref int lda, float[] b, ref int ldb, float[] alphar, float[] alphai, float[] beta, float[] vl, ref int ldvl, float[] vr, ref int ldvr, float[] work, ref int lwork, ref int info, int llen, int rlen);

		[DllImport(dllName, ExactSpelling=true, SetLastError=false, CallingConvention=CallingConvention.Cdecl)]
		internal static extern int ilaenv_(ref int ispec, string name, string opts, ref int n1, ref int n2, ref int n3, ref int n4, int name_len, int opts_len);

		#endregion PInvoke calls
	}
}